﻿<%@ Page Language="C#" AutoEventWireup="true" CodeFile="ClassBaseInfo.aspx.cs" Inherits="Manage_basisset_ClassBaseInfo" %>
<%@ Register Assembly="CuteEditor" Namespace="CuteEditor" TagPrefix="CE" %>
<%@ Register Assembly="Brettle.Web.NeatUpload" Namespace="Brettle.Web.NeatUpload"
    TagPrefix="Upload" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title></title>
    <link rel="stylesheet" type="text/css" href="../skin/css/base.css" />
     <script type="text/javascript">

         function checkForm() {
             var control = document.getElementById("txtname");
             var code = document.getElementById("txtcode");
             var classType = document.getElementById("ddlClassType");
             var passScore = document.getElementById("txtPassScore");
             var time = document.getElementById("txttime");
             var re = /^[0-9]\d*\.\d{1,2}$/;
             if (classType.value == 0) {
                 alert("请选择课程类别！");
                 classType.focus();
                 return false;
             }
             if (code.value.length == 0) {
                 alert("课程编号不能为空！");
                 code.focus();
                 return false;
             }
             if (control.value.length == 0) {
                 alert("课程名称不能为空！");
                 control.focus();
                 return false;
             }
             if (time.value.length == 0) {
                 alert("课程小时数不能为空！");
                 time.focus();
                 return false;
             }
             if ((!re.test(time.value))) {
                 alert("课程小时数必须为带1位或2位小数的正小数!");
                 time.focus();
                 return false;
             }

             if (passScore.value.length == 0) {
                 alert("通过分数不能为空！");
                 passScore.focus();
                 return false;
             }
             if ((!re.test(passScore.value))) {
                 alert("课程通过分数数必须为带1位或2位小数的正小数!");
                 passScore.focus();
                 return false;
             }

         }
         function ToggleVisibility(id, type) {
             el = document.getElementById(id);
             if (el.style) {

                 if (type == 'on') {

                     el.style.display = 'block';

                 }

                 else {

                     el.style.display = 'none';

                 }

             }

             else {

                 if (type == 'on') {

                     el.display = 'block';

                 }

                 else {

                     el.display = 'none';

                 }

             }

         }
  </script>
  <style type="text/css">
.STYLE4 {
	font-size: 16px;
	color: #FF0000;
}
.STYLE5 {color: #FF0000}
.cbox{ border:none}
      .style3
      {
          height: 53px;
      }
  </style>
</head>
<body>
    <form id="form1" runat="server">
  <asp:ScriptManager ID="ScriptManager1" runat="server"  EnableScriptGlobalization="True" EnableScriptLocalization="True">
        </asp:ScriptManager>
         <asp:UpdatePanel ID="up1" runat="server" >
    <ContentTemplate>
       <table width="98%" border="0" cellpadding="2" cellspacing="1" bgcolor="#D1DDAA" align="center" style="margin-top:8px">
        <tr bgcolor="#E7E7E7">
          <td height="24" colspan="5" background="../skin/images/tbg.gif"><div align="left" >
              课程基本信息</div></td>
        </tr>
        <tr align='center' bgcolor="#FFFFFF" onMouseMove="javascript:this.bgColor='#FCFDEE';" onMouseOut="javascript:this.bgColor='#FFFFFF';" height="22" >
          <td width="13%" align="left">课程类型：<span class="STYLE5">*</span></td>
           <td align="left">
               <asp:DropDownList ID="ddlClassType" runat="server" ></asp:DropDownList> 
         </td>
             <td width="13%" align="left">课程编号：<span class="STYLE5">*</span></td>
             <td align="left">
                <asp:TextBox ID="txtcode" runat="server" Width="200px"></asp:TextBox>
            </td>
          <td width="20%"></td>
        </tr>
      
        <tr align='center' bgcolor="#FFFFFF" onMouseMove="javascript:this.bgColor='#FCFDEE';" onMouseOut="javascript:this.bgColor='#FFFFFF';" height="22" >
          <td width="13%" align="left">课程名称：<span class="STYLE5">*</span></td>
           <td align="left">
            
              <asp:TextBox ID="txtname" runat="server" Width="200px"></asp:TextBox>
             
            </td>
             <td width="13%" align="left">课程小时数：<span class="STYLE5">*</span></td>
             <td align="left">
              <asp:TextBox ID="txttime"  runat="server" Width="200px"></asp:TextBox>(小时)
              
            </td>
          <td width="20%"></td>
        </tr>
          <tr align='center' bgcolor="#FFFFFF" onMouseMove="javascript:this.bgColor='#FCFDEE';" onMouseOut="javascript:this.bgColor='#FFFFFF';" height="22" >
          <td width="13%" align="left">通过课程所需分数：<span class="STYLE5">*</span></td>
           <td align="left">
               <asp:TextBox ID="txtPassScore" runat="server" Width="200px"></asp:TextBox>
             
            </td>
             <td width="13%" align="left">课程状态：</td>
             <td align="left">
              <asp:RadioButtonList ID="rbtlIsvalid"  runat="server" RepeatDirection="Horizontal" CssClass="cbox"  BorderStyle="None" BorderWidth="0">
                  <asp:ListItem Text="禁用" Value="0" ></asp:ListItem>
                  <asp:ListItem Text="启用" Value="1" Selected="True"></asp:ListItem>
             </asp:RadioButtonList>
            
            </td>
          <td width="20%"></td>
        </tr>
          <tr align='center' bgcolor="#FFFFFF" onMouseMove="javascript:this.bgColor='#FCFDEE';" onMouseOut="javascript:this.bgColor='#FFFFFF';" height="22" >
          <td width="13%" align="left">学习形式：</td>
           <td align="left">
            
              <asp:TextBox ID="txtStudyMode" runat="server" Width="200px"  Text="网上学习"></asp:TextBox>
             
            </td>
             <td width="13%" align="left">学员对象：</td>
             <td align="left" colspan="2">
              <asp:TextBox ID="txtStudentsObject"  runat="server" Width="493px"></asp:TextBox>
              
            </td>
          
        </tr>
         <tr align='center' bgcolor="#FFFFFF" onMouseMove="javascript:this.bgColor='#FCFDEE';" onMouseOut="javascript:this.bgColor='#FFFFFF';" height="22" >
          <td width="13%" align="left"></td>
           <td align="left" colspan="4">
            <asp:ImageButton ID="ibtnmusic" runat="server" 
       ImageUrl="../../images/btn_backgroudmusic.png" Width="15px" Height="15px" 
       AlternateText="背景音乐控制开关" onclick="ibtnmusic_Click" Visible="false" />
              <asp:Label ID="lblPlay" runat="server" ></asp:Label>
                 <div id="ProgressBar"  style="display:none">
 
                   <Upload:ProgressBar ID="pbProgressBar" runat='server' Inline="true" Width="280px"
 
                           Height="50px">
 
                   </Upload:ProgressBar>
 
               </div>
             &nbsp;&nbsp;&nbsp;&nbsp;<asp:Button ID="btndelBackGroudMusic" Visible="false"  OnClick="btndelBackGroudMusic_Click"  runat="server" Text="删除背景音乐" />
            </td>
        </tr>
         <tr align='center' bgcolor="#FFFFFF" onMouseMove="javascript:this.bgColor='#FCFDEE';" onMouseOut="javascript:this.bgColor='#FFFFFF';" height="22" >
          <td width="13%" align="left">上传背景音乐(支持上传文件的格式包括：mp3、 mid、mav)</td>
           <td align="left" colspan="4">
            
               <Upload:inputfile id="InputFile1" runat="server" Width="266px" ></Upload:inputfile>&nbsp;
                <asp:Button ID="btnupload" runat="server"  Text="上传" OnClientClick="ToggleVisibility('ProgressBar','on')"
                    onclick="btnupload_Click"/>
            </td>
        </tr>
         <tr align='center' bgcolor="#FFFFFF" onMouseMove="javascript:this.bgColor='#FCFDEE';" onMouseOut="javascript:this.bgColor='#FFFFFF';" >
          <td width="13%" align="left" class="style3">课程目标：</td>
           <td align="left" colspan="4" class="style3">
             <%--  <asp:TextBox ID="txtStudyGoals" runat="server"  TextMode="MultiLine" Height="144px" Width="400px"></asp:TextBox>--%>
              <CE:Editor ID="txtStudyGoals" runat="server" Height="244px" Width="600px" AutoConfigure="Simple"  ShowToolBar="false" Font-Size="Smaller"  Font-Names="宋体"  ShowHtmlMode="false" ShowPreviewMode="false" AutoParseClasses="false"  ShowTagSelector="false" AllowPasteHtml="false" ForeColor="Black" >
        
        </CE:Editor>
            </td>
            
        </tr>
         <tr align='center' bgcolor="#FFFFFF" onMouseMove="javascript:this.bgColor='#FCFDEE';" onMouseOut="javascript:this.bgColor='#FFFFFF';" height="22" >
          <td width="13%" align="left">上传课程用户：</td>
           <td align="left" colspan="4">
               
              <asp:Label ID="lbluser" runat="server"></asp:Label>
              
            
             <asp:HiddenField ID="hdfuserid" runat="server" />
            </td>
        </tr>
      </table>
    
     <!--  提交 -->
      <table width='98%'  border='0' cellpadding='1' cellspacing='1' bgcolor='#CBD8AC' align="center" style="margin-top:8px">
        <tr bgcolor='#EEF4EA'>
          <td background='skin/images/wbg.gif' align='center'><table border='0' cellpadding='0' align="center" cellspacing='0'>
              <tr>
                
                <td  align="center"><asp:Button ID="btnsave" runat="server" Text="保存" 
                        OnClientClick="return checkForm();false" onclick="btnsave_Click" /></td>
               
              </tr>
            </table></td>
        </tr>
      </table>
       
       
    </ContentTemplate>
    <Triggers><asp:PostBackTrigger ControlID="btnupload" /></Triggers>
    </asp:UpdatePanel>
    </form>
</body>
</html>
